PdfBarcodeShape Text
Gets or sets the text of the bar code shape.
public string Text {get;Set} |
Return value
string | Associated text of the bar code |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
PdfBarcodeShape pdfBarcode = new PdfBarcodeShape();
pdfBarcode.Angle = 0;
pdfBarcode.AutoExpand = false;
pdfBarcode.CompactMode = Pdf417CompactionMode.TextMode;
pdfBarcode.ErrorCorrectionLevel = Pdf417ErrorCorrectionLevel.Default;
pdfBarcode.FlipHorizontally = false;
pdfBarcode.FlipVertically = false;
pdfBarcode.Height = 5;
pdfBarcode.Width = 10;
pdfBarcode.InvertImage = false;
pdfBarcode.Location = new Point3D(0, 0, 0);
pdfBarcode.MarkingOrder = MarkingOrder.HatchBeforeOutline;
pdfBarcode.QuietZone = false;
pdfBarcode.Text = "SMAPI VER 4";
pdfBarcode.NumberOfColumns = 8;
pdfBarcode.NumberOfRows = 4;
pdfBarcode.HatchingDirection = BarcodeScanDirection.TopToBottom;
pdfBarcode.HatchLineDirection = BarcodeScanDirection.LeftToRight;
pdfBarcode.HatchPattern = BarcodeHatchPattern.CreateLineHatchPattern(0.01f, false, false);
vectorImage.AddBarcode(pdfBarcode);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}